import os

import pytest
import shell as shell

if __name__ == '__main__':

    shell = shell.Shell()
    ss=os.path.abspath(os.path.dirname(__file__))

    xml_report_path = os.path.join(ss,'report','xml')
    html_report_path = os.path.join(ss,'report','html')
    # xml_report_path = xml_report_path.replace('\\','/')
    # html_report_path = html_report_path.replace('\\','/')

    # args = ['./','-s', '-q', '--alluredir', xml_report_path]
    args = ['./', '-s', '-q', '--alluredir', 'target/allure-results']
    pytest.main(args)
    #
    # cmd = 'allure generate -c %s -o  %s' % (xml_report_path, html_report_path)
    # # cmd='calc'
    # try:
    #     shell.Shell.exexute(cmd)
    # except Exception:
    #     raise

    # args = ['./','-s', '-q']
    # pytest.main(args)



